import Password from 'antd/es/input/Password'
import http from '../axios'
// 9.此页面封装每一个后端的接口
export function getData(params) {
    return http.request({
        url: 'http://localhost:8090/getData',
        method: 'get',
        params:params
    })
}
export function getList() {
    return http.request({
        url: 'http://localhost:8090/getList',
        method: 'get',
    })
}

export function getEcharts(){
    return http.request({
        url:'http://localhost:8090/getEcharts',
        method:'get',
    })
}

export function getTableData(params){
    return http.request({
        url:'http://localhost:8090/user/getTableData',
        method:'get',
        params:params
    })
}

export function addUser(data){
    console.log(data,'接口传输的data');
    return http.request({
        url:'http://localhost:8090/user/addorEdit',
        method:'post',
        data:data
    })
}

export function deleteUser(data){
    return http.request({
        url:'http://localhost:8090/user/delete',
        method:'post',
        data:data
    })
}

export function login(data){
    return http.request({
        url:'http://localhost:8090/user/login',
        method:'post',
        data:data
    })
}

export function getUserInfo(){
    return http.request({
        url:'http://localhost:8090/user/getUserInfo',
        method:'get',
    })
}
